import request from '@/utils/request'

// 查询告警总览Echarts
export function queryEcharts(queryVo) {
    return request({
        url: '/analysiswarningcontroller/queryEcharts',
        method: 'post',
        data: queryVo
    })
}

// 查询列表数据
export function queryList(queryVo) {
    return request({
        url: '/analysiswarningcontroller/queryList',
        method: 'post',
        data: queryVo
    })
}

// 修改状态
export function updateState(id,code,mark) {
    return request({
        url: `/analysiswarningcontroller/updateState?id=${id}&code=${code}&mark=${mark}`,
        method: 'get'
    })
}

// 查询分数Echarts
export function queryScoreEcharts(type) {
    return request({
        url: `/analysiswarningcontroller/queryScoreEcharts?type=${type}`,
        method: 'post'
    })
}

// 查询ScriptApp
export function queryScriptApp(model,stat) {
    return request({
        url: `/scriptappcontroller/queryScriptAppByType?type=${model}&status=${stat}`,
        method: 'post'
    })
}

export function queryScriptApp2(model) {
  return request({
    url: `/scriptappcontroller/queryScriptAppByType2?type=${model}`,
    method: 'post'
  })
}

// 查询ScriptApp
export function queryScriptAppByTypeNew(model) {
  return request({
    url: `/scriptappcontroller/queryScriptAppByTypeNew?type=${model}`,
    method: 'post'
  })
}


export function updateScriptAppById(id,s) {
  return request({
    url: `/scriptappcontroller/updateScriptAppById?id=${id}&state=${s}`,
    method: 'post'
  })
}
